<head>
    <style>
        table, th, td {
            border: 1px solid black;
            border-collapse: collapse;
        }
        th, td {
            padding: 15px;
            text-align: center;
        }
    </style>
</head>

<h1 align="center">Request Openings</h1>

<table style="width:100%" bgcolor="#F6F6FF">
    <tr>
        <th>Position ID</th>
        <th>Title</th>
        <th>Store Location</th>
        <th>Open?</th>
        <th>Count</th>
        <th>Request</th>
    </tr>

    <% @positions.each do |position| %>
        <tr>
            <%= form_tag({action: :submit}, {method: :post}) do %>
                <%= hidden_field_tag('posting_id', position.posting_id) %>
                <%= hidden_field_tag('position_type_id', position.position_type_id) %>
                <%= hidden_field_tag('title', position.title) %>
                <%= hidden_field_tag('description', position.description) %>
                <%= hidden_field_tag('store_id', position.store_id) %>
                <td><%= position.position_type_id %></td>
                <td><%= position.title %></td>
                <td><%= position.city %>, <%= position.state %></td>
                <td><%= check_box_tag('is_open', value=position.is_open, checked=position.is_open) %></td>
                <td><%= text_field_tag('job_count', value=position.job_count,
                                       options={:size=>'4', :style=>'text-align: center; font-weight: bold;'}) %></td>
                <td><%= submit_tag('Request') %></td>
            <% end %>
        </tr>
    <% end %>
</table>

<br><br>

<%= link_to('Back to Hiring Manager Home', hiring_manager_home_path) %>
